﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace day1_case1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            //int a = 10;
            //int b = a;
            //b = 20;
            //float f = 88.8f;

            //Console.WriteLine("a={0}", a);
            //Console.WriteLine("b={0}", b);

            //Console.Read();  //用read或死循环终止，防止程序一闪而过
            //while (true) { }


            //string[] A = new string[3] { "1", "2", "3" };
            //string[] B = A;
            //B[0] = "aa";  //引用传递和值传递的区别
            //Console.WriteLine("arrA is: ");
            //for (int i = 0; i < A.Length; i++) { Console.WriteLine(A[i]); }

            //Console.WriteLine("arrB is: ");
            //for (int i = 0; i < B.Length; i++) { Console.WriteLine(B[i]); }
            //Console.Read();


            //int a = 100;
            //float b = a;
            //Console.WriteLine("整型a的值：" + a);
            //Console.WriteLine("浮点型b的值：" + b);

            //double c = 88.8888;
            //int d = (int)c;

            //Console.WriteLine("双精度浮点型c的值：" + c);
            //Console.WriteLine("整型d的值：" + d);
            //Console.Read();

            //int e = 100;
            //object o = e;
            //Console.WriteLine("装箱操作e的值{0}，装箱为o的值{1}", e, o);
            //e = 800;
            //Console.WriteLine("装箱操作e的值{0}，装箱为o的值{1}", e, o);  //装箱装的是值

            //int f=(int)o;
            //Console.WriteLine("拆箱操作o的值{0}，f的值{1}", o, f);
            //Console.Read();


            string name = "xiaochen";
            int age = 20;
            Console.WriteLine("name is " + name+ ",age is " + age) ;
            Console.WriteLine("name is {0},age is {1}",name ,age);
            Console.Read();

        }



    }
}
